import { msOfDay } from "./constants"

export function getBeginTimeOfDay(date: Date, deltaDay: number = 0): Date {
  const d = new Date(date.getTime() + deltaDay * msOfDay)
  d.setHours(0, 0, 0, 0)
  return d
}
